Skip to content

Add distributionally robust optimization (DRO) for fairness explainer - #569

Open
propcgamer20-png wants to merge 2 commits into
yakew7:mainfrom
propcgamer20-png:docs/dro-fairness-explainer
Open

Add distributionally robust optimization (DRO) for fairness explainer#569
propcgamer20-png wants to merge 2 commits into
yakew7:mainfrom
propcgamer20-png:docs/dro-fairness-explainer

Conversation

@propcgamer20-png

Copy link
Copy Markdown
Collaborator

Closes #544.

New explainers/distributionally-robust-optimization.md on DRO as an in-processing fairness technique: minimize worst-case loss over an uncertainty set of subgroup distributions, rather than constraining a named parity metric.

Stacked on #543. The DRO and max-min explainers cross-reference each other, so this branch is built on top of the #543 branch and its diff currently also contains #543's maxmin-fairness.md. Please merge #543 first; this PR's diff then collapses to just the DRO explainer plus the reciprocal-link edit in maxmin-fairness.md. (Cross-fork PRs can't target a branch that only exists on my fork, hence the combined diff.)

Structure

  • Min-max objective spelled out against ExponentiatedGradient's constrained objective (this repo's S3). DRO needs neither a chosen fairness metric nor a named group up front, and no group labels at prediction time.

  • Concrete example - Audit 03 German Credit, age:

    ERM baseline group DRO (robustness knob swept)
    q(young) 0.50 (by group size) rises to ~0.63 and saturates
    young held-out log_loss 0.588 ~0.599 (does not improve)
    overall accuracy 0.770 0.770

    DRO reliably finds and reweights toward the worst group, but on a capacity-limited linear model it buys no worst-group generalization - a direct, honest illustration of Sagawa et al.'s headline ("On the Importance of Regularization for Worst-Case Generalization"). Cross-references the frozen S0 -> S3 demographic_parity_diff (-0.129 -> +0.023) to show DRO targets a different quantity than the constraint does.

  • Runnable code - fit_group_dro (online group-DRO loop) and dro_report. Pasted Script Execution Output verified byte-for-byte against the extracted block; deterministic with pinned libs.

  • Limitations - the uncertainty-set size is a free parameter with no data-driven default; still needs training-time group labels; worst-case train loss is not worst-case test loss; the grouping and loss choice bound what it can see.

Citations (verified against proceedings)

Sagawa, Koh, Hashimoto & Liang, ICLR 2020 (arXiv:1911.08731); Hashimoto et al., ICML 2018 (PMLR 80:1929-1938); Duchi & Namkoong, Annals of Statistics 49(3) 2021; Agarwal et al., ICML 2018.

check_em_dash.py, check_broken_links.py (1570 links), check_explainer_count.py (62), check_generated_files_current.py, tests/test_build_explainers.py all pass.

New explainers/maxmin-fairness.md. Covers the fairness objective that
minimizes the maximum group-level loss (Rawls' difference principle)
rather than equalizing a rate across groups, and the real conflict
between it and parity metrics: a model can move toward max-min fairness
while still failing demographic parity.

- Objective-function contrast: demographic parity's constrained average
  loss vs max-min's min-of-max over per-group losses.
- Concrete example on the Audit 03 German Credit data (age, under 30): a
  plain logistic-regression baseline (older 81.0% acc, younger 70.9%,
  worst-group error 29.1%) vs an iterative group-reweighting max-min loop
  (worst-group error 27.9%, older unchanged, overall accuracy flat) that
  leaves the ~12-point selection-rate gap almost untouched. Cross-refs the
  repo's own frozen accuracy_equality_diff (-0.153, p=0.031) as the gap
  max-min targets and S1-S4 do not.
- Fully runnable detection/implementation code (fit_maxmin + maxmin_report),
  deterministic output verified against the pasted block.
- Limitations: tiny/noisy subgroups without a min-group-size floor;
  worst-off is only defined once a loss is chosen; silent on between-group
  gaps; levelling-down permitted at the margin without a Pareto constraint.
- Citations verified: Rawls (1971); Hashimoto et al. ICML 2018; Martinez,
  Bertran & Sapiro ICML 2020; Diana et al. AIES 2021.

Regenerated the HTML page, OG images, explainers-data.{js,json}, package
mirror, sitemap.xml and llms-full.txt; check_explainer_count.py --fix
bumped the 60 -> 61 mentions. The companion DRO explainer (yakew7#544) will add
the reciprocal cross-links.
…closes yakew7#544)

New explainers/distributionally-robust-optimization.md. Covers DRO as an
in-processing fairness technique - minimise worst-case loss over an
uncertainty set of subgroup distributions - and contrasts it with this
repo's S3 constraint-based ExponentiatedGradient (needs a chosen parity
metric and a named group up front; DRO needs neither, and no group labels
at prediction time).

- Min-max objective spelled out against ExponentiatedGradient's
  constrained objective; the online group-DRO algorithm (Sagawa et al.
  2020) and the uncertainty-set radius as the 'robustness knob'.
- Concrete example on Audit 03 German Credit (age): an ERM baseline
  (young held-out log_loss 0.588) vs online group DRO sweeping the
  robustness knob. DRO reliably drives q(young) from 0.50 to ~0.63, but
  worst-group test log_loss does not improve (drifts to ~0.599) and
  overall accuracy stays flat - a direct, honest illustration of Sagawa
  et al.'s 'importance of regularization for worst-case generalization'.
  Cross-refs the frozen S0 -> S3 demographic_parity_diff (-0.129 -> +0.023)
  to show DRO targets a different quantity than the constraint does.
- Runnable fit_group_dro + dro_report; pasted output verified against the
  extracted block, deterministic with pinned libs.
- Limitations: uncertainty-set size is a free parameter with no
  data-driven default; still needs training-time group labels; worst-case
  train loss != worst-case test loss; grouping/loss choice bounds it.
- Citations verified: Sagawa et al. ICLR 2020; Hashimoto et al. ICML 2018;
  Duchi & Namkoong AoS 2021; Agarwal et al. ICML 2018.

Also adds the reciprocal cross-links in maxmin-fairness.md (yakew7#543).
Regenerated HTML, OG images, explainers-data.{js,json}, package mirror,
sitemap.xml, llms-full.txt; check_explainer_count.py --fix bumped 61 -> 62.

Stacked on the yakew7#543 branch since the two explainers cross-reference each
other; retarget to main once yakew7#543 merges.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@propcgamer20-png is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

@yakew7 @Shreyash0712 - new PR touching a path you own, please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explainer: What Is Distributionally Robust Optimization (DRO) for Fairness?

1 participant